#pragma once

#include <string>
#include <vector>

namespace IVRFlow{
class CIVRNode
{
public:
	CIVRNode(void);
	CIVRNode(std::string talkID):m_talkID(talkID),m_nextNodeName(""){}
	virtual ~CIVRNode(void);
	virtual int Enter(void) = 0;
	virtual int Leave(void);
	virtual void Terminate(){m_blockMode = false;}
	std::string GetNextNodeName(){ return m_nextNodeName;}
	void SetNextNodeName(std::string nodeName){m_nextNodeName = nodeName;}
	virtual void processKeyRecived(std::string key){};
	virtual void processHook(){};
	virtual void processPlayFinished(){};
	void pushJsScriptLine(std::string line){if(line != "")m_jsScript.push_back(line);};
protected:
	std::string m_talkID;
	std::string m_nextNodeName;
	std::string m_NodeName;
	bool m_blockMode;
	std::vector<std::string> m_jsScript;
	std::vector<std::string> m_keyJScript;
};

}